<?php

use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Auth;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', 'Web\PagesController@root')
     ->name('root');

// 用户身份验证相关的路由
Route::get('login', 'Web\LoginController@showLoginForm')
     ->name('login');
Route::post('login', 'Web\LoginController@login');
Route::post('logout', 'Web\LoginController@logout')
     ->name('logout');

// 用户注册相关路由
Route::get('register', 'Web\RegisterController@showRegistrationForm')
     ->name('register');
Route::post('register', 'Web\RegisterController@register');

// 密码重置相关路由
Route::get('password/reset', 'Web\ForgotPasswordController@showLinkRequestForm')
     ->name('password.reset');
Route::post('password/reset', 'Web\ResetPasswordController@reset')
     ->name('password.update');

Route::resource('users', 'Web\UsersController', ['only' => ['show', 'update', 'edit']]);

